<template>
	<view class="service-center-page">
		<view class="title">
			服务中心
		</view>
		<view class="service-centerBar">
			<view class="service-centerBar-item" v-for="(item,index) in serviceCenterBarData" :key="index"
				@click="serviceClick(item,index)">
				<view class="icon" :style="{ backgroundImage: 'url(' + item.icon + ')' }">

				</view>
				<view class="text">
					{{item.text}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				serviceCenterBarData: [{
					id: 1,
					text: "续租",
					icon: '/static/my/service_center_1.png'
				}, {
					id: 2,
					text: "买断",
					icon: '/static/my/service_center_2.png'
				}, {
					id: 3,
					text: "店铺入驻",
					icon: '/static/my/service_center_3.png'
				}, {
					id: 4,
					text: "客服介入",
					icon: '/static/my/service_center_4.png'
				}, {
					id: 5,
					text: "举报中心",
					icon: '/static/my/service_center_5.png'
				}, {
					id: 6,
					text: "投诉建议",
					icon: '/static/my/service_center_6.png'
				}, {
					id: 7,
					text: "发票",
					icon: '/static/my/service_center_7.png'
				}, {
					id: 8,
					text: "帮助",
					icon: '/static/my/service_center_8.png'
				}, {
					id: 9,
					text: "关于我们",
					icon: '/static/my/service_center_9.png'
				}, {
					id: 10,
					text: "协议中心",
					icon: '/static/my/service_center_10.png'
				}, {
					id: 11,
					text: "客服",
					icon: '/static/my/service_center_11.png'
				}, {
					id: 12,
					text: "签到",
					icon: '/static/my/service_center_12.png'
				}]
			}
		},
		methods: {
			serviceClick(item, index) {
				if (item.id == 1) {
					uni.navigateTo({
						url: "/pages/mys/Lease/Lease"
					})
				}
				if (item.id == 2) {
					uni.navigateTo({
						url: "/pages/mys/Lease/Lease"
					})
				}
				if (item.id == 4) {
					uni.navigateTo({
						url: "/pages/mys/kefus/kefus"
					})
				}
				if (item.id == 6) {
					uni.navigateTo({
						url: "/pages/mys/suggestion/suggestion"
					})
				}
				if (item.id == 5) {
					uni.navigateTo({
						url: "/pages/mys/report/report"
					})
				}
				if (item.id == 7) {
					uni.navigateTo({
						url: "/pages/mys/Billing/Billing"
					})
				}
				if (item.id == 8) {
					uni.navigateTo({
						url: "/pages/mys/Helps/Helps"
					})
				}
				if (item.id == 9) {
					uni.navigateTo({
						url: "/pages/mys/about/about"
					})
				}
				if (item.id == 11) {
					uni.navigateTo({
						url: "/pages/mys/kefus/kefus"
					})
				}
				if (item.id == 12) {
					uni.navigateTo({
						url: "/pages/mys/signs/signs"
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.service-center-page {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;

		.title {
			width: 95%;
			height: 100rpx;
			line-height: 100rpx;
			font-size: 34rpx;
			font-weight: bold;
		}

		.service-centerBar {
			width: 95%;
			height: 500rpx;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;

			.service-centerBar-item {
				width: 150rpx;
				height: 150rpx;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: space-evenly;

				.icon {
					width: 60rpx;
					height: 60rpx;
					background-size: contain;
					background-position: center;
					background-repeat: no-repeat;
				}

				.text {
					width: 100%;
					text-align: center;
					font-size: 30rpx;
				}
			}
		}
	}
</style>